package com.ch09b;

public class Hotel {
	private int noOfRooms = 12; // (1)
	private int maxNoOfGuests = initMaxGuests(); // (2) Bug
	private int occupancyPerRoom = 2; // (3)

	public int initMaxGuests() { // (4)
		System.out.println("occupancyPerRoom: " + occupancyPerRoom);
		System.out.println("maxNoOfGuests: " + noOfRooms * occupancyPerRoom);
		return noOfRooms * occupancyPerRoom;
	}

	public int getMaxGuests() {
		return maxNoOfGuests;
	} // (5)

	public int getOccupancy() {
		return occupancyPerRoom;
	}
}
